#ifndef     __PARTS_H
#define     __PARTS_H

#include "../../utils/nocopyable.h"
#include "../../utils/object.h"

namespace driver {

class Parts : private utils::NoCopyable {

public:
    Parts();

    void open_pump();
    void close_pump();

    // 排水阀
    void open_valve();
    void close_valve();

    void open_fan();
    void close_fan();

    void open_drop_ice();
    void close_drop_ice();

    inline bool is_pump_open() {
        return m_pump_flag;
    }
    inline bool is_valve_open() {
        return m_valve_flag;
    }
    inline bool is_fan_open() {
        return m_fan_falg;
    }
    inline bool is_drop_ice_open() {
        return m_drop_ice_flag;
    }

private:
    bool m_pump_flag = false;
    bool m_valve_flag = false;
    bool m_fan_falg = false;
    bool m_drop_ice_flag = false;
};

inline utils::Object<Parts> parts;

}

#endif
